#ifndef WIDGET_H
#define WIDGET_H
#define _WIN32_DCOM
#include <QWidget>
#include <QDebug>

#include <atlbase.h>
#include <comdef.h>
#include <iostream>
#include <Windows.h>
#include <shlobj_core.h>
#include <taskschd.h>
#pragma comment(lib, "taskschd.lib")



QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE


class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private:
    Ui::Widget *ui;
    ITaskService* m_lpITS = NULL;
    ITaskFolder* m_lpRootFolder = NULL;
    void Taskinit();
    BOOL CreateTask(const char* lpszTaskName,const char* lpszProgramPath,const char* lpszParameters,const char* lpszAuthor);
    BOOL DeleteTask(char* lpszTaskName);
    void UnInit();
};
#endif // WIDGET_H
